From: Aaron Schulz Date: Wed, 31 Oct 2012 18:51:21 +0000 (-0700) Subject: [JobQueue] Use "flush" option with commit(). X-Git-Tag: 1.31.0-rc.0~21783 X-Git-Url: http://git.cyclocoop.org/%28%5B%5E/404?a=commitdiff_plain;h=c748d9ce65e8883d629042afb46e567b687e70d2;p=lhc%2Fweb%2Fwiklou.git [JobQueue] Use "flush" option with commit(). Change-Id: If612f8e282c1aa7014461f8878aa9721b30eeb42 --- diff --git a/includes/job/JobQueueDB.php b/includes/job/JobQueueDB.php index b850610e05..e9af92ac9c 100644 --- a/includes/job/JobQueueDB.php +++ b/includes/job/JobQueueDB.php @@ -279,10 +279,7 @@ class JobQueueDB extends JobQueue { */ protected function doAck( Job $job ) { $dbw = $this->getMasterDB(); - if ( $dbw->trxLevel() ) { - wfWarn( "Attempted to ack a job in a transaction; committing first." ); - $dbw->commit(); // push existing transaction - } + $dbw->commit( __METHOD__, 'flush' ); // flush existing transaction $autoTrx = $dbw->getFlag( DBO_TRX ); // automatic begin() enabled? $dbw->clearFlag( DBO_TRX ); // make each query its own transaction